/**
 * Copyright &copy; 2012-2016 <a href="https://git.oschina.net/zdw2016/webbase5">Webbase</a> All rights reserved.
 */
package com.foreveross.webbase.project.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.foreveross.webbase.common.persistence.DataEntity;

/**
 * 服务器管理Entity
 * @author yangwanli
 * @version 2017-03-13
 */
public class SysSpServle extends DataEntity<SysSpServle> {
	
	private static final long serialVersionUID = 1L;
	private String privateIp;		// 内网IP
	private String publicIp;		// 外网IP
	private String user;		// 用户
	private String pwd;		// 密码
	private Date createTime;		// 创建时间
	private String servletName;		// 服务器名称
	
	public SysSpServle() {
		super();
	}

	public SysSpServle(String id){
		super(id);
	}

	@Length(min=0, max=255, message="内网IP长度必须介于 0 和 255 之间")
	public String getPrivateIp() {
		return privateIp;
	}

	public void setPrivateIp(String privateIp) {
		this.privateIp = privateIp;
	}
	
	@Length(min=0, max=255, message="外网IP长度必须介于 0 和 255 之间")
	public String getPublicIp() {
		return publicIp;
	}

	public void setPublicIp(String publicIp) {
		this.publicIp = publicIp;
	}
	
	@Length(min=0, max=255, message="用户长度必须介于 0 和 255 之间")
	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}
	
	@Length(min=0, max=255, message="密码长度必须介于 0 和 255 之间")
	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="创建时间不能为空")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@Length(min=1, max=255, message="服务器名称长度必须介于 1 和 255 之间")
	public String getServletName() {
		return servletName;
	}

	public void setServletName(String servletName) {
		this.servletName = servletName;
	}
	
}